fix: 修复 GitHub Actions Release 流水线配置隐患#126
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的 / Purpose
本 PR 旨在修复自动化发版流水线(GitHub Actions + GoReleaser)中存在的鉴权丢失与环境版本硬编码问题,确保官方在触发打 Tag 发版时能够顺利、无误地创建 Release 产物。
变更内容 / Changes
release.yml的 GoReleaser 步骤中显式注入了${{ secrets.GITHUB_TOKEN }}。修复了因缺乏该内置权限,导致 GoReleaser 无法在当前仓库创建 Release 及挂载产物的致命问题 (Error 403 / exit code 1)。release.yml中硬编码的go-version: '1.22',改为官方推荐的go-version-file: 'go.mod'配置。这使得 CI 编译环境能够始终与代码底座 (Go 1.25.0) 保持严格的动态一致,彻底杜绝了因跨版本编译可能引发的语法报错或隐患。